package application 
{
	import application.controller.*;
	import flash.display.Stage;
	import org.puremvc.as3.interfaces.IFacade;
	import org.puremvc.as3.patterns.facade.Facade;

	/**
	 * ...
	 * @author Ning
	 */
	public class ApplicationFacade extends Facade implements IFacade
	{
		//系统
		//启动
		public static const START_UP:String = 'startUp';
		
		//布局配置更新完成
		public static const UPDATE_LAYOUT_CONFIG:String = 'updateLayoutConfig';
		
		//groupCombobox配置完成
		public static const UPDATE_GROUP_CONFIG:String = 'updateGroupConfig';
		
		//更新导航
		public static const UPDATE_MODULE_NAV_DATA:String = 'updateModuleNavData';
		
		//更新模块
		public static const UPDATE_MODULE_DATA:String = 'updateModuleData';
		
		
		//图片区域配置更新
		public static const UPDATE_PIC_AREA_CONFIG:String = 'updatePicAreaConfig';
		//组更新
		public static const UPDATE_GROUPS:String = 'updateGroups';
        //更新图片区域数据
		public static const UPDATE_PIC_AREA_DATA:String = 'updatePicAreaData';
		
		//展示图片
		public static const SHOW_PHOTO_VIEW:String = 'showPhotoView';
		//展示图片区
		public static const SHOW_PHOTO_AREA:String = 'showPhotoArea';
		
		//更新图片view配置
		public static const UPDATE_PHOTO_VIEW_CONFIG:String = 'updatePhotoViewConfig';
		
		
		public static function getInstance():ApplicationFacade
		{
			if (instance == null)
			    instance = new ApplicationFacade();
			return instance as ApplicationFacade;
		}

		override protected function initializeController():void 
		{
			super.initializeController();
			registerCommand(START_UP, StartupCommand);
		}
	    public function startup(app:Application):void
		{
			sendNotification(START_UP, app);
		}
	}
}